<?php
require_once("global.php");

$sitetitle = 'Sales - '.$system["sitename"];
HEAD();

$sql = "SELECT dr.id,dr.name,dr.image,dr.content FROM ".$prefix."dealer_region AS dr WHERE language=".LANGUAGE_ID;
$rslist = $DB->qgGetAll($sql,true);
foreach($rslist AS $key=>$value)
{
	$sqldl = "SELECT d.id,d.name,d.content FROM ".$prefix."dealer AS d WHERE regionId=".$value['id'];
	
    $rslist[$key]["dealers"] = $DB->qgGetAll($sqldl, true);
}
unset($sql);
unset($sqldl);

FOOT("sales");
?>